Download Java SE 8 Programmer.1z0-808.SelfTestEngine.2020-02-26.112q.vcex

Vendor: Oracle
Exam Code: 1z0-808
Exam Name: Java SE 8 Programmer
Date: Feb 26, 2020
File Size: 9 MB

How to open VCEX files?

Files with VCEX extension can be opened by ProfExam Simulator.

Purchase
Coupon: EXAM_HUB

Discount: 20%

Demo Questions

Question 1
Given:
  
What is the result?
  1. 200.0 : 100.0
  2. 400.0 : 200.0
  3. 400.0 : 100.0
  4. Compilation fails.
Correct answer: C
Question 2
Which statement is true about the switch statement?
  1. It must contain the default section.
  2. The break statement, at the end of each case block, is optional.
  3. Its case label literals can be changed at runtime.
  4. Its expression must evaluate to a collection of values.
Correct answer: B
Question 3
Given the code fragment:
  
What is the result?
  1. Sum is 600
  2. Compilation fails at line n1.
  3. Compilation fails at line n2.
  4. A ClassCastException is thrown at line n1.
  5. A ClassCastException is thrown at line n2.
Correct answer: C
Question 4
What is the name of the Java concept that uses access modifiers to protect variables and hide them within a class?
  1. Encapsulation
  2. Inheritance
  3. Abstraction
  4. Instantiation
  5. Polymorphism
Correct answer: A
Explanation:
Using the private modifier is the main way that an object encapsulates itself and hide data from the outside world. Reference: http://www.tutorialspoint.com/java/java_access_modifiers.htm
Using the private modifier is the main way that an object encapsulates itself and hide data from the outside world. 
Reference: http://www.tutorialspoint.com/java/java_access_modifiers.htm
Question 5
Given the code fragment:
  
Which two modifications, made independently, enable the code to compile? (Choose two.)
  1. Make the method at line n1 public.
  2. Make the method at line n2 public.
  3. Make the method at line n3 public.
  4. Make the method at line n3 protected.
  5. Make the method at line n4 public.
Correct answer: CD
Question 6
Given these two classes:
  
Any amount of electricity used by a customer (represented by an instance of the Customer class) must contribute to the customer's bill (represented by the member variable bill) through the useElectricity method.  
An instance of the Customer class should never be able to tamper with or decrease the value of the member variable bill. 
How should you write methods in the ElectricAccount class at line n1 so that the member variable bill is always equal to the value of the member variable kwh multiplied by the member variable rate?
  1.   
  2.   
  3.   
  4.   
Correct answer: A
Question 7
Given the code fragment:
  
What is the result?
  1. Match 1
  2. Match 2
  3. No Match
  4. A NullPointerException is thrown at runtime.
Correct answer: A
Question 8
Given:
  
What is the result?
  1. A B C D
  2. A C D
  3. A C D D
  4. A B D
  5. A B D C
Correct answer: C
Question 9
Given the code fragment:
  
Which option can replace xxx to enable the code to print 135?
  1.   
  2.   
  3.   
  4.   
Correct answer: B
Question 10
Given this class:
  
And given this main method, located in another class:
  
Which three lines, when inserted independently at line n1, cause the program to print a 0 balance? (Choose three.) 
  1. acct.setAmount(-acct.getAmount());
  2. acct.amount = 0; <option D earlier>
  3. acct.setAmount(0);
  4. acct.getAmount() = 0; <option E earlier>
  5. this.amount = 0; <option A earlier>
  6. acct.changeAmount(0); <option F earlier>
  7. acct.changeAmount(-acct.amount); <option G earlier>
Correct answer: BDF
HOW TO OPEN VCE FILES

Use VCE Exam Simulator to open VCE files
Avanaset

HOW TO OPEN VCEX AND EXAM FILES

Use ProfExam Simulator to open VCEX and EXAM files
ProfExam Screen

ProfExam
ProfExam at a 20% markdown

You have the opportunity to purchase ProfExam at a 20% reduced price

Get Now!